<!doctype html>
<html>


<!--其他设置-->


<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>AI</title>
    <link type="text/css" rel="stylesheet" href="style/index.css">
    <link type="text/css" rel="stylesheet" href="style/reset.css">
    <link type="text/css" rel="stylesheet" href="style/swiper.min.css">
    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="js/path.js"></script>
    <script type="text/javascript" src="js/md5.js"></script>

    <script>

       $(function () {
           pathinit();
       });


       function pathinit() {
           var sign = $.md5(jsonSort(map) + token + time + time);
           map.sign = sign.toUpperCase();
           $.get(path + "/v1/pathseting/findallpath",map,function (res) {

               for (var k in res.data){

                   if (res.data[k].type == "visitors") {
                       $("#visitorspath").val(res.data[k].path);
                   }
                   if (res.data[k].type == "ai") {
                       $("#aipath").val(res.data[k].path);
                   }
                   if (res.data[k].type == "customer") {
                       $("#customerpath").val(res.data[k].path);
                   }
                   if (res.data[k].type == "deletevisitorytime") {

                       var rObj = document.getElementsByName("time");

                       for(var i = 0;i < rObj.length;i++){
                               if(rObj[i].value == res.data[k].path){
                                   rObj[i].checked =  'checked';
                               }
                       }
                   }


               }

           },'');
       }


        function submitseting(){
            var visitorspath= $("#visitorspath").val();
            var customerpath= $("#customerpath").val();
            var aipath=$("#aipath").val();
            //获取清理访客文件夹记录的时间周期
            var deletevisitorytime=$("input[name='time']:checked").val();

            if (visitorspath == "") {
                confirm("访客文件夹路径不能为空");
                return;
            }

            if (customerpath == "") {
                confirm("会员头像文件夹路径不能为空");
                return;
            }

            if (aipath == "") {
                confirm("图片与视频文件夹不能为空");
                return;
            }

            if (visitorspath == customerpath || visitorspath == aipath || customerpath == aipath) {
                confirm("文件夹路径不能存在相同");
                return;
            }

                        var sign1 = $.md5(jsonSort({
                            timestamp: time,
                            nonce: time,
                            token: token,
                            visitorspath: visitorspath,
                            customerpath: customerpath,
                            deletevisitorytime: deletevisitorytime,
                            aipath: aipath,

                        }) + token + time + time);

                        $.post(path + "/v1/pathseting/updatepathfore",
                            {
                                timestamp: time,
                                nonce: time,
                                token: token,
                                visitorspath: visitorspath,
                                customerpath: customerpath,
                                deletevisitorytime: deletevisitorytime,
                                aipath: aipath,
                                sign: sign1.toUpperCase(),
                            }
                            , function (res) {

                                if (res.code == 0) {
                                    confirm("修改成功");
                                } else {
                                    confirm("修改失败");
                                }

                            }, 'json');


        }


       function replacement() {

           /**
            * 重置文本框中的值
            */
           $("#visitorspath").val("");
           $("#aipath").val("");
           $("#customerpath").val("");

           var rObj = document.getElementsByName("time");

           for(var i = 0;i < rObj.length;i++){
                   rObj[i].checked = false;
           }


       }




    </script>



</head>

<body>
<header class="inhead-box">
	  <div class="inhead"> <a href="#" class="logo abe-fl">人脸识别系统</a>
<div class="user-info abe-fr"> <span><em class="vi-green">admin</em>，您好！ </span> <a href="#" class="uhead"><img src="images/user_head.jpg" alt=""></a>  </div>
   <nav class="abe-fr"><a href="customermanage.html" >会员管理</a><a href="dataanalysis.html">数据分析</a><a href="aishow.html">AI显示</a><a href="systemsettings.html" class="active">系统设置</a><a href="extendmodule.html">扩展模块</a></nav>
  </div>
</header>
<div class="blank20"></div>
<div class="main">
  <div class="menu abe-fl">
    <h1 class="title"><a href="index.html"><i class="iconfont abe-ft24 mrg_10">&#xe601;</i>回首页</a></h1>
    <ul>
<!--      <li><a href="customermanage.html"><i class="iconfont">&#xe73c;</i>会员管理</a></li>-->
<!--      <li><a href="informationpush.html"><i class="iconfont">&#xe600;</i>信息推送</a></li>-->
        <li ><a href="systemsettings.html"><i class="iconfont">&#xe6b5;</i>设备管理</a></li>
        <li><a href="extendmodule.html"><i class="iconfont">&#xe610;</i>扩展模块</a></li>

      <li class="active"><a href="othersettings.html"><i class="iconfont">&#xe660;</i>其他设置</a></li>
    </ul>
  </div>
  <div class="content abe-fr">
    <div class="local"> 当前位置<em class="abe-space">&gt;</em><span class="abe-gray3">其他设置</span> </div>
    
    <div class="user-form">
    <div class="blank20"></div>

   <ul class="user-form-ul" style="padding-left:80px;">

 <li><span>访客文件夹<i class="abe-red"></i></span></li>
      <li>
        <input type="text" class="text" id="visitorspath">
      </li>
      <li><span>图片与视频文件夹<i class="abe-red"></i></span></li>
      <li>
        <input type="text" class="text" id="aipath">

      </li>
 <li><span>会员头像文件夹<i class="abe-red"></i></span></li>
      <li>
        <input type="text" class="text" id="customerpath">

      </li>
	   
	   <li><span>AI优化摄像机密码<i class="abe-red"></i></span></li>
      <li>

        <input type="text" class="text">

      </li>

       <li><span>清除访客记录<i class="abe-red"></i></span></li>

      <li>
          <span class="ck-item"><input type="radio" name="time"  value="hour">每小时</span>
		  <span class="ck-item"><input type="radio" name="time"  value="day">一天</span>
		  <span class="ck-item"><input type="radio" name="time"  value="week">一周</span>
		  <span class="ck-item"><input type="radio" name="time"  value="month">一个月</span>
		  <span class="ck-item"><input type="radio" name="time"  value="threemonth">三个月</span>
		  <span class="ck-item"><input type="radio" name="time"  value="halfyear">半年</span>
		  <span class="ck-item"><input type="radio" name="time"  value="oneyear">一年</span>
      </li>

      <li class="com-submit pdt_10">
                
                <input type="button" class="vi-btn-green" onclick="submitseting()" value="保存设置">
                <input type="button" class="vi-btn-orange mlg_15" onclick="replacement()" value="重置设置">
        </li>
    </ul>

        <div class="blank30"></div>
   
    </div>
  </div>
</div>
<div class="icp">Copyright © 2006 - 2015 人脸识别系统版权所有   沪ICP备 0000001号 </div>
</body>
</html>
